package com.ysh.webflux.config;

import com.ysh.webflux.controller.TestController;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.server.RequestPredicates;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.RouterFunctions;
import org.springframework.web.reactive.function.server.ServerResponse;

/**
 * 袁胜虎 on 2022/9/22 17:13
 */
@Configuration
public class WebfluxConfig {
    @Bean
    public RouterFunction<ServerResponse> routerFunction() {
//        return RouterFunctions.route(RequestPredicates.GET("/users"), TestController::findAllUsers);
//        用这个方法写需要改返回值类型 还是用注解的方法写最好
        return null;

    }
}